package dwz.persistence.mapper;

import dwz.dal.BaseMapper;
import dwz.persistence.beans.SysRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysRoleMapper extends BaseMapper<SysRole,Integer>{

	Integer isUniqueRoleName(@Param("id") Integer id, @Param("name") String name);

	void insertRolePermission(SysRole role);

	void deleteRolePermission(@Param("roleid") Integer roleid);

	List<SysRole> getUserRoles(@Param("id") Integer userid);

}
